package com.china.produce.controller;

import com.china.produce.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2023/3/3
 */
@RequestMapping("/auth")
@RestController
public class AuthController {

    @RequiresRoles(value = {"t1", "t2"})
    @PostMapping("/testRoles")
    public void testRoles(@RequestParam("role") String role) {

        System.out.println("testRoles success !" + role);
    }
}
